﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using FCTC_Web.Content;

namespace FCTC_Web.Models
{
    /// <summary>
    /// 评估师
    /// </summary>
    public class Estimator : EntityBase
    {
        public int? PersonalID { get; set; }
        [Display(Name = "个人信息")]
        public virtual Personal Personal { get; set; }

        public int? ShopID { get; set; }
        [Display(Name = "从业商家")]
        public virtual Shop Shop { get; set; }

        [Display(Name="工作年限"),Range(1,20)]
        public int WorkingExperience { get; set; }

        public string WorkFor
        {
            get
            {

                if (Shop != null)
                    return Shop.FullName;
                else
                    return "暂缺";
            }
        }

        [Display(Name = "职业资格证号"),Required(ErrorMessage="请填写职业资格证号")]
        [MaxLength(30)]
        public string CertificationNumber { get; set; }

        [Display(Name = "评估师等级"), Required(ErrorMessage = "请选择评估师等级")]
        [MaxLength(10)]
        public string EstimatorLevel { get; set; }

        [Display(Name = "联系方式")]
        [DataType(DataType.PhoneNumber),Required(ErrorMessage="请填写工作电话")]
        [MaxLength(30)]
        public string WorkPhone { get; set; }

        [Display(Name = "座右铭")]
        [MaxLength(50)]
        public string Motto { get; set; }

        [Display(Name = "擅长")]
        [MaxLength(1000)]
        public string Familiar { get; set; }

        [Display(Name = "级别")]
        [Range(1,30)]
        public int? Level { get; set; }

        [Display(Name = "星级勋章")]
        [MaxLength(10)]
        public string Medal { get; set; }

        [Display(Name = "星座")]
        [MaxLength(10)]
        public string Horoscope { get; set; }

        [Display(Name = "爱好")]
        [MaxLength(20)]
        public string Habit { get; set; }

        [Display(Name = "最爱座驾")]
        [MaxLength(20)]
        public string IdiaCar { get; set; }

        [Display(Name = "诚信勋章")]
        public bool HasTrustMedal { get; set; }

        [Display(Name = "优秀勋章")]
        public bool HasOutStandingMedal { get; set; }

        [Display(Name = "案例")]
        public string Case
        {
            get;
            set;
        }

        //对应视频列表
        public virtual List<Clip> Clips { get; set; }
        //对应案例列表
        public virtual List<Case> Cases { get; set; }
        //对应评论列表
        public virtual List<Comment> Comments { get; set; }
        //对应推荐热卖车列表
        public virtual List<Vehicle> RecommendVehicles { get; set; }

        [Display(Name = "评估师主页链接")]
        public string MainPageUrl { get; set; }

        // 对应图片地址列表
        public virtual List<ImageModel> Imgs { get; set; }


    }
}